package com.liao.badminton.vo;

import com.liao.badminton.code.BaseField;
import io.swagger.annotations.ApiModelProperty;
import java.lang.String;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import lombok.Data;
import com.liao.badminton.entity.BoutRecord;
/**
* @author liaocheng
* @date 2024-11-01
* description:单局详情表
*/
@Data
public class BoutRecordVo  extends BaseField {

    @ApiModelProperty(value = "id")
    private Long id;

    @ApiModelProperty(value = "录入记录id")
    private Long importRecordId;

    @ApiModelProperty(value = "群id")
    private Long groupId;

    @ApiModelProperty(value = "对局内容：格龙胜软x*2")
    private String txtBout;

    @ApiModelProperty(value = "赢家名称")
    private String winName;

    @ApiModelProperty(value = "输家名称")
    private String loseName;

    @ApiModelProperty(value = "赢家得分")
    private Integer winScore;

    @ApiModelProperty(value = "输家得分")
    private Integer loseScore;

    @ApiModelProperty(value = "对局类型：1:单打，2:双打，3:3v3")
    private Integer boutType;

    @ApiModelProperty(value = "奖励金币")
    private BigDecimal awardCoin;

    private List<Long> delIds;  //批量删除ids

    public static BoutRecordVo invertToVo(BoutRecord boutRecord){
        BoutRecordVo vo = new BoutRecordVo();
        BaseField.invert(boutRecord, vo);
        vo.setId(boutRecord.getId());
        vo.setImportRecordId(boutRecord.getImportRecordId());
        vo.setGroupId(boutRecord.getGroupId());
        vo.setTxtBout(boutRecord.getTxtBout());
        vo.setWinName(boutRecord.getWinName());
        vo.setLoseName(boutRecord.getLoseName());
        vo.setWinScore(boutRecord.getWinScore());
        vo.setLoseScore(boutRecord.getLoseScore());
        vo.setBoutType(boutRecord.getBoutType());
        vo.setAwardCoin(boutRecord.getAwardCoin());
        return vo;
    }
}
